package cn.yangliu.task.utils;

import cn.yangliu.task.entity.PageInfo;

/**
 * 作者 杨柳
 * 时间 2017-10-19 14:49
 * 描述
 */
public class PageThreadLocal {

    private static ThreadLocal<PageInfo> pageInfoThreadLocal = new ThreadLocal<>();

    public static PageInfo getPageInfo(){
        PageInfo pageInfo = pageInfoThreadLocal.get();

        pageInfoThreadLocal.remove();

        return pageInfo;
    }

    public static void setPageInfo(PageInfo pageInfo){
        pageInfoThreadLocal.set(pageInfo);
    }
}
